home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl760
/
scnp785j.lzh
/
NONLIN.FIT
< prev
next >
Wrap
Text File
|
1992-06-21
|
871b
|
45 lines
* Start Nonlinear Curve Fitter program then type this command: LOAD NONLIN.FIT
*
* Read the data that is to be fit.
read 6
1.68 0.172
3.33 0.25
5 0.286
6.67 0.303
10 0.334
19 0.384
*
* Set the number of parameters (p1 & p2).
numpar 2
*
* Enter initial estimates of the parameters.
p1 = 10
p2 = 500
*
* Enter the equation that is to be fit to the data.
t1= p2 + x
y(x)= p1 * x / t1
*
* Enter partial derivatives of the equation with respect to the parameters.
partials on
dy/dp1= x / t1
dy/dp2= -p1 * x / ( t1 * t1 )
*
* Plot the fit using the initial parameter values;
* shows that the initial parameter values give a poor fit.
wait
plotfit
*
* Find a better fit.
fit
*
* Plot the improved fit.
wait
plotfit
*
* Output fit parameters (optionally to a printer or a file).
outfit
*
* Exit to DOS
quit